package cn.shengchao.examstar.knowledge.domain.repository;

import cn.shengchao.examstar.knowledge.domain.entity.KnowledgePointMastery;

import java.util.List;
import java.util.Optional;

/**
 * 知识点掌握度仓储接口
 */
public interface KnowledgePointMasteryRepository {
    
    /**
     * 保存知识点掌握度信息
     */
    KnowledgePointMastery save(KnowledgePointMastery knowledgePointMastery);
    
    /**
     * 根据用户ID和知识点ID查询掌握度
     */
    Optional<KnowledgePointMastery> findByUserIdAndKnowledgePointId(Long userId, Long knowledgePointId);
    
    /**
     * 根据用户ID查询所有掌握度信息
     */
    List<KnowledgePointMastery> findByUserId(Long userId);
    
    /**
     * 根据学习计划ID查询掌握度信息
     */
    List<KnowledgePointMastery> findByStudyPlanId(Long studyPlanId);
    
    /**
     * 批量更新知识点掌握度
     */
    void batchUpdateMastery(List<KnowledgePointMastery> masteryList);
    
    /**
     * 删除掌握度信息
     */
    void delete(Long id);
} 